package com.eduhzy.ttw.work.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author xubo
 * @date 2018/12/3 16:13
 */
public class WorkClassData implements Parcelable {

    /**
     * couldUpdate : true
     * createTime : 1543819534000
     * endTime : 1543883441000
     * hasCheck : 0
     * hasRead : 0
     * hasSubmit : 0
     * id : 232
     * online : 1
     * pushTime : 1543819530000
     * score : 0
     * status : 1
     * submitNum : 0
     * teacherId : 340330
     * teacherRealName : 孔夫子
     * totalNum : 1
     * userId : 340344
     * userRealName : 薛平
     * workClassId : 59
     * workContent : 了解我的人，能说出我心中忧愁；不了解我的人，以为我有什么要求。高远的苍天啊，这（了解我的）人是谁？
     * workId : 34
     * workTitle : 2018-11-30知我者，谓我心忧。不知我者，谓我何求。悠悠苍天,此何人哉?
     */

    private boolean couldUpdate;
    private long createTime;
    private long endTime;
    private int hasCheck;
    private int hasRead;
    private int hasSubmit;
    private int id;
    private int online;
    private long pushTime;
    private int score;
    private int status;
    private int submitNum;
    private int teacherId;
    private String teacherRealName;
    private int totalNum;
    private int userId;
    private String userRealName;
    private int workClassId;
    private String workContent;
    private int workId;
    private int level;
    private String workTitle;

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public boolean isCouldUpdate() {
        return couldUpdate;
    }

    public void setCouldUpdate(boolean couldUpdate) {
        this.couldUpdate = couldUpdate;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public int getHasCheck() {
        return hasCheck;
    }

    public void setHasCheck(int hasCheck) {
        this.hasCheck = hasCheck;
    }

    public int getHasRead() {
        return hasRead;
    }

    public void setHasRead(int hasRead) {
        this.hasRead = hasRead;
    }

    public int getHasSubmit() {
        return hasSubmit;
    }

    public void setHasSubmit(int hasSubmit) {
        this.hasSubmit = hasSubmit;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getOnline() {
        return online;
    }

    public void setOnline(int online) {
        this.online = online;
    }

    public long getPushTime() {
        return pushTime;
    }

    public void setPushTime(long pushTime) {
        this.pushTime = pushTime;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getSubmitNum() {
        return submitNum;
    }

    public void setSubmitNum(int submitNum) {
        this.submitNum = submitNum;
    }

    public int getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(int teacherId) {
        this.teacherId = teacherId;
    }

    public String getTeacherRealName() {
        return teacherRealName;
    }

    public void setTeacherRealName(String teacherRealName) {
        this.teacherRealName = teacherRealName;
    }

    public int getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(int totalNum) {
        this.totalNum = totalNum;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserRealName() {
        return userRealName;
    }

    public void setUserRealName(String userRealName) {
        this.userRealName = userRealName;
    }

    public int getWorkClassId() {
        return workClassId;
    }

    public void setWorkClassId(int workClassId) {
        this.workClassId = workClassId;
    }

    public String getWorkContent() {
        return workContent;
    }

    public void setWorkContent(String workContent) {
        this.workContent = workContent;
    }

    public int getWorkId() {
        return workId;
    }

    public void setWorkId(int workId) {
        this.workId = workId;
    }

    public String getWorkTitle() {
        return workTitle;
    }

    public void setWorkTitle(String workTitle) {
        this.workTitle = workTitle;
    }

    public WorkClassData() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte(this.couldUpdate ? (byte) 1 : (byte) 0);
        dest.writeLong(this.createTime);
        dest.writeLong(this.endTime);
        dest.writeInt(this.hasCheck);
        dest.writeInt(this.hasRead);
        dest.writeInt(this.hasSubmit);
        dest.writeInt(this.id);
        dest.writeInt(this.online);
        dest.writeLong(this.pushTime);
        dest.writeInt(this.score);
        dest.writeInt(this.status);
        dest.writeInt(this.submitNum);
        dest.writeInt(this.teacherId);
        dest.writeString(this.teacherRealName);
        dest.writeInt(this.totalNum);
        dest.writeInt(this.userId);
        dest.writeString(this.userRealName);
        dest.writeInt(this.workClassId);
        dest.writeString(this.workContent);
        dest.writeInt(this.workId);
        dest.writeInt(this.level);
        dest.writeString(this.workTitle);
    }

    protected WorkClassData(Parcel in) {
        this.couldUpdate = in.readByte() != 0;
        this.createTime = in.readLong();
        this.endTime = in.readLong();
        this.hasCheck = in.readInt();
        this.hasRead = in.readInt();
        this.hasSubmit = in.readInt();
        this.id = in.readInt();
        this.online = in.readInt();
        this.pushTime = in.readLong();
        this.score = in.readInt();
        this.status = in.readInt();
        this.submitNum = in.readInt();
        this.teacherId = in.readInt();
        this.teacherRealName = in.readString();
        this.totalNum = in.readInt();
        this.userId = in.readInt();
        this.userRealName = in.readString();
        this.workClassId = in.readInt();
        this.workContent = in.readString();
        this.workId = in.readInt();
        this.level = in.readInt();
        this.workTitle = in.readString();
    }

    public static final Creator<WorkClassData> CREATOR = new Creator<WorkClassData>() {
        @Override
        public WorkClassData createFromParcel(Parcel source) {
            return new WorkClassData(source);
        }

        @Override
        public WorkClassData[] newArray(int size) {
            return new WorkClassData[size];
        }
    };
}
